
<?php
/**
 * Created by PhpStorm.
 * User: fang_
 * Date: 2016/10/6
 * Time: 15:13
 */
$stuname = "fang";
$emails = array();
foreach (file('stuemail.csv') as $email)
{
    $raw_email = explode(',',$email);
    $emails[$raw_email[0]] = $raw_email[1];
}
if ($emails[$stuname]== null) echo 'sdf';